<?php
/**
 * Created by JetBrains PhpStorm.
 * User: thinhhung
 * Date: 6/2/12
 * Time: 10:21 AM
 * To change this template use File | Settings | File Templates.
 */
?>


<script>
    $(function () {
        $("#datepicker").datepicker();
    });
</script>

<?php
echo $this->Form->create('HoaDonBan', array('action' => 'edit'));
?>
<fieldset>
    <legend><label>Cập nhật hóa đơn bán</label></legend>
    <?php echo $this->Form->input('id', array('readonly' => true)); ?>
    <dl>
        <dt><label>Mã nhân viên</label></dt>
        <dd><?php echo $this->Form->input('MANV', array('readonly' => true, 'label' => false)); ?></dd>
    </dl>
    <dl>
        <dt><label>Mã khách hàng</label></dt>
        <dd><?php echo $this->Form->input('MAKH', array('label' => false)); ?></dd>
    </dl>
    <dl>
        <dt><label>Ngày bán</label></dt>
        <dd><?php echo $this->Form->input('NGAYBAN', array('id' => 'datepicker', 'type' => 'text', 'label' => false, 'readonly' => true)); ?></dd>
    </dl>
    <dl>
        <dt><label>Thuế bán (%)</label></dt>
        <dd><?php echo $this->Form->input('THUEBAN', array('label' => false)); ?></dd>
    </dl>
    <dl>
        <dt><label>Loại hóa đơn</label></dt>
        <dd><?php $options = array(null => 'Bán lẻ', 1 => 'Bán sỉ');
            echo $this->Form->input('LOAIHD', array('label' => false,'options' => $options, 'default' => 0));?></dd>
    </dl>
</fieldset>
<div class="button">
    <?php
    echo $this->Form->submit('Lưu', array('div' => false));
    echo $this->Html->Link('Hủy', array('controller' => 'hoa_don_bans', 'action' => 'index'), array('class' => 'cancel'));
    echo $this->Form->end();
    ?>
</div>